<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">

<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <!--360浏览器优先以webkit内核解析-->
    <title>新建课程</title>
    <style>
        /* 基础样式begin */
        * {
            margin: 0;
            padding: 0;
        }

        .fl {
            float: left;
        }

        .fr {
            float: right;
        }

        .clearfix {
            *zoom: 1;
        }

        .clearfix::after {
            content: '.';
            display: block;
            clear: both;
            visibility: hidden;
            height: 0;
            line-height: 0;
        }

        /* 基础样式end */

        .page-title {
            margin: 10px;
        }

        .upload-lesson {
            width: 685px;
            /* height: 566px; */
            /* background: pink; */
            border: 1px solid #f00;
        }

        .content {
            /* border: 1px solid #000; */
            padding: 10px;
        }

        .format-tip {}

        .format-content {
            border: 1px solid #ccc;
            padding: 10px 20px;
            text-align: left;
            font-size: 12px;
            margin-left: 20px;
        }

        .form-input {
            /* background: pink */
        }

        .input-left {
            width: 50%;
            /* background: skyblue; */
        }

        .input-left input {
            margin: 10px 20px;
            width: 60%;
            height: 20px;
        }

        .input-left select {
            margin: 10px 15px;
            width: 61%;
            height: 24px;
        }

        .input-right {
            /* background: red; */
            width: 50%;
            margin-top: 10px;
        }

        .video-box {
            position: relative;
            border: 1px solid #000;
            margin: 20px 0;
        }

        .video-icon {
            text-align: center;
            position: absolute;
            top: 50%;
            left: 50%;
            margin-left: -10px;
            margin-top: -10px;
        }

        .testUpload {
            margin: 10px 0;
        }

        .rich-editor {
            margin: 20px 0
        }

        .set-test {
            /* background: yellow; */
        }

        .set-test-choice label {
            margin: 5px 20px;
            display: inline-block;
        }

        .set-test-choice input {
            margin-left: 5px;
        }

        .confirm-btn {
            width: 100px;
            height: 40px;
            background: red;
            color: #fff;
            text-align: center;
            border: none;
            border-radius: 3px;
            display: block;
            margin: 20px auto;
        }
    </style>
</head>

<body class="gray-bg">
    <div class="upload-lesson">
        <div class="page-title">
            <h3>课程上传</h3>
        </div>
        <div class="content">
            <div class="format-tip clearfix">
                <p class="fl">格式要求:</p>
                <div class="format-content fl">
                    <p>1、只限于后缀名为：MP4视频文件，分辨率：720*1280，大小&lt;200M;</p>
                    <p>2、每门课程必须配备有试题，题型有单选题、多选题、判断题;</p>
                </div>
            </div>
            <div class="form-input clearfix">
                <form action="">
                    <div class="form-top-box clearfix">
                        <div class="input-left fl">
                            <label for="lessonName">课程名称:<input type="text" id="lessonName"></label><br>
                            <label for="uploadTime">上传时间:<input type="text" id="uploadTime"></label><br>
                            <label for="author">课程作者:<input type="text" id="author"></label><br>
                            <label>
                                所属类型:
                                <select name="" class="belong-type">
                                    <option value="-1">请选择</option>
                                    <option value="1">1</option>
                                    <option value="2">2</option>
                                    <option value="3">3</option>
                                </select>
                            </label><br>
                            <label>
                                二级分类:
                                <select name="" class="second-type">
                                    <option value="-1">请选择</option>
                                    <option value="1">1</option>
                                    <option value="2">2</option>
                                    <option value="3">3</option>
                                </select>
                            </label><br>
                            <label for="setScore">设置积分:<input type="text" id="setScore"></label>
                        </div>
                        <div class="input-right fl">
                            <p>课程上传:
                                <a href="javascript:;" onclick="videoToUp()">点击上传</a>
                                <input type="file" id="videoToUp" name="videoToUp" style="display:none;" />
                            </p>
                            <div class="video-box">
                                <video src="" id="videoResource" onclick="videoResource()"></video>
                                <span class="video-icon">视频</span>
                            </div>
                            <p>封面上传:
                                <a href="javascript:;" onclick="imageToUp()">点击上传</a>
                                <input type="file" id="imageToUp" name="imageToUp" style="display:none;" />
                            </p>
                        </div>
                    </div>
                    <div class="">
                        <p class="testUpload">试题上传:
                            <a href="javascript:;" onclick="testToUp()">点击上传</a>
                            <input type="file" id="testToUp" name="testToUp" style="display:none;" />
                            <a href="javascript:;">模板下载</a>
                        </p>
                        <p class="testReview">试题预览:
                            <a href="javascript:;"> (单选题XX道,多选题XX道,判断题XX道) </a>
                        </p>
                    </div>
                    <div class="rich-editor">
                        <textarea name="" id="" cols="100" rows="10">
            </textarea>
                    </div>
                    <div class="set-test">
                        <p>课程学习测试设置:&nbsp;(满分100分)</p>
                        <div class="set-test-choice">
                            <label for="single-choice">单选题:<input type="text" id="single-choice"></label>
                            <label for="single-score">分值:<input type="text" id="single-score"></label>
                            <br>
                            <label for="multiple-choice">多选题:<input type="text" id="multiple-choice"></label>
                            <label for="multiple-score">分值:<input type="text" id="multiple-score"></label>
                            <br>
                            <label for="judge-choice">判断题:<input type="text" id="judge-choice"></label>
                            <label for="judge-score">分值:<input type="text" id="judge-score"></label>
                            <br>
                        </div>
                    </div>
                    <button class="confirm-btn">确认入库</button>
                </form>
            </div>
        </div>
    </div>
</body>

</html>

<script>
    // 点击上传视频
    function videoToUp() {
        document.getElementById('videoToUp').click();
    }

    function videoResource() {
        document.getElementById('videoToUp').click();
    }

    // 点击上传封面
    function imageToUp() {
        document.getElementById('imageToUp').click();
    }

    // 点击上传试题
    function testToUp() {
        document.getElementById('testToUp').click();
    }
</script>